package moco.blatt1.buttons;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);  
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
    public void onClick(View view) {
    	 Button button1 = (Button) this.findViewById(R.id.button1);
         Button button2 = (Button) this.findViewById(R.id.button2);
         
         TextView outputtext = (TextView) this.findViewById(R.id.editText1);
         
         if(view == button1) {
        	outputtext.setText(R.string.hello_gabriel);         	 
         }
         if(view == button2){
        	 outputtext.setText(R.string.hello_seb);        	 
         }
    }
}